<?php
/**
 * SellersApiTest
 * PHP version 8.3
 *
 * @category Class
 * @package  SpApi
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */

/**
 * The Selling Partner API for Sellers
 *
 * The [Selling Partner API for Sellers](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference) (Sellers API) provides essential information about seller accounts, such as:  - The marketplaces a seller can list in - The default language and currency of a marketplace - Whether the seller has suspended listings  Refer to the [Sellers API reference](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference) for details about this API's operations, data types, and schemas.
 *
 * The version of the OpenAPI document: v1
 * Generated by: https://openapi-generator.tech
 * Generator version: 7.9.0
 */

/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Please update the test case below to test the endpoint.
 */

namespace SpApi\Test\Api;

use SpApi\ApiException;
use SpApi\Api\sellers\v1\SellersApi;
use SpApi\ObjectSerializer;

/**
 * SellersApiTest Class Doc Comment
 *
 * @category Class
 * @package  SpApi
 * @author   OpenAPI Generator team
 * @link     https://openapi-generator.tech
 */
class SellersApiTest extends BaseTestCase
{
    private SellersApi $apiInstance;
    public function setUp(): void
    {
        parent::setUp();
        // Initialize parameter value specific to case
        $this->testHelper->setSpecificValue('SellersApi', $this->getName());
        $this->apiInstance = new SellersApi($this->config, null);
        // Change Time Format if it requires
        $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('SellersApi');
        if ($specificTimeFormat) {
            ObjectSerializer::setDateTimeFormat($specificTimeFormat);
        }
    }

    /**
     * Test case for getAccount_200
     */
    public function testGetAccount200()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testGetAccount200', 'SellersApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Success.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/GetAccountResponse&quot;
      },
      &quot;example&quot; : {
        &quot;payload&quot; : {
          &quot;businessType&quot; : &quot;PRIVATE_LIMITED&quot;,
          &quot;marketplaceParticipationList&quot; : [ {
            &quot;marketplace&quot; : {
              &quot;id&quot; : &quot;ATVPDKIKX0DER&quot;,
              &quot;name&quot; : &quot;United States&quot;,
              &quot;countryCode&quot; : &quot;US&quot;,
              &quot;domainName&quot; : &quot;www.amazon.com&quot;
            },
            &quot;storeName&quot; : &quot;BestSellerStore&quot;,
            &quot;participation&quot; : {
              &quot;isParticipating&quot; : true,
              &quot;hasSuspendedListings&quot; : false
            }
          } ],
          &quot;sellingPlan&quot; : &quot;PROFESSIONAL&quot;,
          &quot;business&quot; : {
            &quot;name&quot; : &quot;BestSeller Inc.&quot;,
            &quot;nonLatinName&quot; : &quot;ベストセラー株式会社&quot;,
            &quot;registeredBusinessAddress&quot; : {
              &quot;addressLine1&quot; : &quot;123 Main St&quot;,
              &quot;addressLine2&quot; : &quot;Suite 500&quot;,
              &quot;city&quot; : &quot;Seattle&quot;,
              &quot;stateOrProvinceCode&quot; : &quot;WA&quot;,
              &quot;postalCode&quot; : &quot;98101&quot;,
              &quot;countryCode&quot; : &quot;US&quot;
            },
            &quot;companyRegistrationNumber&quot; : &quot;123456789&quot;,
            &quot;companyTaxIdentificationNumber&quot; : &quot;987654321&quot;
          },
          &quot;primaryContact&quot; : {
            &quot;name&quot; : &quot;John Doe&quot;,
            &quot;nonLatinName&quot; : &quot;ジョン・ドゥ&quot;,
            &quot;address&quot; : {
              &quot;addressLine1&quot; : &quot;456 Oak St&quot;,
              &quot;addressLine2&quot; : &quot;Apt 12&quot;,
              &quot;city&quot; : &quot;Seattle&quot;,
              &quot;stateOrProvinceCode&quot; : &quot;WA&quot;,
              &quot;postalCode&quot; : &quot;98102&quot;,
              &quot;countryCode&quot; : &quot;US&quot;
            }
          }
        }
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : { }
      },
      &quot;response&quot; : {
        &quot;payload&quot; : {
          &quot;businessType&quot; : &quot;PRIVATE_LIMITED&quot;,
          &quot;marketplaceParticipationList&quot; : [ {
            &quot;marketplace&quot; : {
              &quot;id&quot; : &quot;ATVPDKIKX0DER&quot;,
              &quot;name&quot; : &quot;United States&quot;,
              &quot;countryCode&quot; : &quot;US&quot;,
              &quot;domainName&quot; : &quot;www.amazon.com&quot;
            },
            &quot;storeName&quot; : &quot;BestSellerStore&quot;,
            &quot;participation&quot; : {
              &quot;isParticipating&quot; : true,
              &quot;hasSuspendedListings&quot; : false
            }
          } ],
          &quot;sellingPlan&quot; : &quot;PROFESSIONAL&quot;,
          &quot;business&quot; : {
            &quot;name&quot; : &quot;BestSeller Inc.&quot;,
            &quot;nonLatinName&quot; : &quot;ベストセラー株式会社&quot;,
            &quot;registeredBusinessAddress&quot; : {
              &quot;addressLine1&quot; : &quot;123 Main St&quot;,
              &quot;addressLine2&quot; : &quot;Suite 500&quot;,
              &quot;city&quot; : &quot;Seattle&quot;,
              &quot;stateOrProvinceCode&quot; : &quot;WA&quot;,
              &quot;postalCode&quot; : &quot;98101&quot;,
              &quot;countryCode&quot; : &quot;US&quot;
            },
            &quot;companyRegistrationNumber&quot; : &quot;123456789&quot;,
            &quot;companyTaxIdentificationNumber&quot; : &quot;987654321&quot;
          },
          &quot;primaryContact&quot; : {
            &quot;name&quot; : &quot;John Doe&quot;,
            &quot;nonLatinName&quot; : &quot;ジョン・ドゥ&quot;,
            &quot;address&quot; : {
              &quot;addressLine1&quot; : &quot;456 Oak St&quot;,
              &quot;addressLine2&quot; : &quot;Apt 12&quot;,
              &quot;city&quot; : &quot;Seattle&quot;,
              &quot;stateOrProvinceCode&quot; : &quot;WA&quot;,
              &quot;postalCode&quot; : &quot;98102&quot;,
              &quot;countryCode&quot; : &quot;US&quot;
            }
          }
        }
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'getAccount'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('SellersApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->getAccountWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(200, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 200, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 200);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for getAccount_400
     */
    public function testGetAccount400()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testGetAccount400', 'SellersApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Request has missing or invalid parameters and cannot be parsed.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/GetAccountResponse&quot;
      }
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : { }
      },
      &quot;response&quot; : {
        &quot;errors&quot; : [ {
          &quot;code&quot; : &quot;InvalidInput&quot;,
          &quot;message&quot; : &quot;Invalid Input&quot;
        } ]
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'getAccount'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('SellersApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->getAccountWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(400, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 400, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 400);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for getAccount_403
     */
    public function testGetAccount403()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getAccount_404
     */
    public function testGetAccount404()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getAccount_413
     */
    public function testGetAccount413()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getAccount_415
     */
    public function testGetAccount415()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getAccount_429
     */
    public function testGetAccount429()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getAccount_500
     */
    public function testGetAccount500()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getAccount_503
     */
    public function testGetAccount503()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getMarketplaceParticipations_200
     */
    public function testGetMarketplaceParticipations200()
    {
        try {
            // Skip test if it is in the skip list
            if ($this->testHelper->shouldSkipTest('testGetMarketplaceParticipations200', 'SellersApi')) {
                $this->assertTrue(true);
                return;
            }
            $jsonSchema = '{
  &quot;description&quot; : &quot;Marketplace participations successfully retrieved.&quot;,
  &quot;headers&quot; : {
    &quot;x-amzn-RequestId&quot; : {
      &quot;description&quot; : &quot;Unique request reference identifier.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    },
    &quot;x-amzn-RateLimit-Limit&quot; : {
      &quot;description&quot; : &quot;Your rate limit (requests per second) for this operation.&quot;,
      &quot;schema&quot; : {
        &quot;type&quot; : &quot;string&quot;
      }
    }
  },
  &quot;content&quot; : {
    &quot;application/json&quot; : {
      &quot;schema&quot; : {
        &quot;$ref&quot; : &quot;#/components/schemas/GetMarketplaceParticipationsResponse&quot;
      }
    },
    &quot;payload&quot; : {
      &quot;example&quot; : [ {
        &quot;marketplace&quot; : {
          &quot;id&quot; : &quot;ATVPDKIKX0DER&quot;,
          &quot;name&quot; : &quot;Amazon.com&quot;,
          &quot;countryCode&quot; : &quot;US&quot;,
          &quot;defaultCurrencyCode&quot; : &quot;USD&quot;,
          &quot;defaultLanguageCode&quot; : &quot;en_US&quot;,
          &quot;domainName&quot; : &quot;www.amazon.com&quot;
        },
        &quot;storeName&quot; : &quot;BestSellerStore&quot;,
        &quot;participation&quot; : {
          &quot;isParticipating&quot; : true,
          &quot;hasSuspendedListings&quot; : false
        }
      } ]
    }
  },
  &quot;x-amzn-api-sandbox&quot; : {
    &quot;static&quot; : [ {
      &quot;request&quot; : {
        &quot;parameters&quot; : { }
      },
      &quot;response&quot; : {
        &quot;payload&quot; : [ {
          &quot;marketplace&quot; : {
            &quot;id&quot; : &quot;ATVPDKIKX0DER&quot;,
            &quot;countryCode&quot; : &quot;US&quot;,
            &quot;name&quot; : &quot;Amazon.com&quot;,
            &quot;defaultCurrencyCode&quot; : &quot;USD&quot;,
            &quot;defaultLanguageCode&quot; : &quot;en_US&quot;,
            &quot;domainName&quot; : &quot;www.amazon.com&quot;
          },
          &quot;storeName&quot; : &quot;BestSellerStore&quot;,
          &quot;participation&quot; : {
            &quot;isParticipating&quot; : true,
            &quot;hasSuspendedListings&quot; : false
          }
        } ]
      }
    } ]
  }
}';
            $result = $this->testHelper->extractRequestAndResponse(
                $this->apiInstance,
                $jsonSchema,
                'getMarketplaceParticipations'
            );
            $requestParams = $result['requestParams'];
            $expectedResponse = $result['expectedResponse'];

            // Change Time Format if it requires
            $specificTimeFormat = $this->testHelper->getDateTimeFormatForCase('SellersApi');
            if ($specificTimeFormat) {
                ObjectSerializer::setDateTimeFormat($specificTimeFormat);
            }

            // Act: Call API
            list($response, $statusCode, $headers) =
                $this->apiInstance->getMarketplaceParticipationsWithHttpInfo(...array_values($requestParams));

            // Assert the response code
            $this->assertHttpStatusCode(200, $statusCode);

            // Handle different response codes
            $this->handleResponse($response, $statusCode, 200, $expectedResponse);
        } catch (ApiException $e) {
            $this->handleApiException($e, 200);
        } catch (\ReflectionException $e) {
            $this->fail("Reflection exception: " . $e->getMessage());
        }
    }
    /**
     * Test case for getMarketplaceParticipations_400
     */
    public function testGetMarketplaceParticipations400()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getMarketplaceParticipations_403
     */
    public function testGetMarketplaceParticipations403()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getMarketplaceParticipations_404
     */
    public function testGetMarketplaceParticipations404()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getMarketplaceParticipations_413
     */
    public function testGetMarketplaceParticipations413()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getMarketplaceParticipations_415
     */
    public function testGetMarketplaceParticipations415()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getMarketplaceParticipations_429
     */
    public function testGetMarketplaceParticipations429()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getMarketplaceParticipations_500
     */
    public function testGetMarketplaceParticipations500()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
    /**
     * Test case for getMarketplaceParticipations_503
     */
    public function testGetMarketplaceParticipations503()
    {
        // Skip this test
        $this->markTestSkipped('Skip test for this operation.');
    }
}
